import React from 'react';
import { t } from '@/locales/i18n';
import { SvgIcon } from '../icon';

type Props = {
  text?: string | React.ReactNode;
  iconSize?: string | number;
  className?: string;
};

const DataEmpty = ({ text, iconSize = '48px', className, ...props }: Props) => {
  return (
    <div className={`mt-5 flex flex-col items-center py-10vh ${className}`} {...props}>
      <SvgIcon icon='ic_rj_empty' size={iconSize}/>
      <div className='mt-2 text-center text-sm color-gray-500'>
        {text || t('common.empty_data')}
      </div>
    </div>
  );
};

export default DataEmpty;
